package com.enba.mallapi.module.auth.controller.resp;

import com.enba.boot.core.utils.TreeNode;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

/** 系统左侧菜单树节点响应类 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "系统左侧菜单树节点响应类")
@Data
public class MenuTreeNodeResp extends TreeNode {

  public MenuTreeNodeResp(Long id, Long parentId, String name) {
    super(id, parentId, name);
    this.title = name;
  }

  private String title;

  private String icon;

  private Integer type;

  private String openType;

  private String href;

  private Integer status;

  // true:选中 false:未选中
  @JsonIgnore private boolean layChecked;

  public void setLayChecked(boolean layChecked) {
    this.layChecked = layChecked;
  }

  @JsonGetter("LAY_CHECKED")
  public boolean getLAY_CHECKED() {
    return layChecked;
  }
}
